name = '程子涵'

def string_to_ascii(string_):
    ascii_name = ''
    for i in string_:
        i = str(ord(i))
        ascii_name += i
    return ascii_name


csc = '312432337628085'
def ascii_to_string(csc):
    z = ''
    name = ''
    for p,i in enumerate(csc):
        z += i
        if (p+1)%5 == 0:
            string_ = chr(int(z))
            name += string_
            z = ''
    return name

def ascii_to_string_two(csc):
    name = ''
    length = len(csc)
    if length%5 == 0 and csc.isdigit():
        index_start = 0
        while index_start <= length-5:
            index_end = index_start + 5
            string_ = chr(int(csc[index_start:index_end]))
            name += string_
            index_start = index_end
    else:
        raise Exception('输入有误！')
    return name


ascii_ = string_to_ascii(name)
print(ascii_)
name_ = ascii_to_string(ascii_)
print(name_)
print(ascii_to_string_two(ascii_))